﻿using Financial.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Financial.WebApi.ViewModels
{
    public class IncomePageVm
    {
        public int page { get; set; }
        public int total { get; set; }
        public int records { get; set; }
        public List<IncomeRowVm> rows { get; set; }

        public IncomePageVm(int page, int total, int records, List<Income> recordData)
        {
            this.page = page;
            this.total = total;
            this.records = records;
            rows = (from income in recordData
                    select new IncomeRowVm(income.Id, income)).ToList();
        }
    }
}